projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ecc2898
)
libxc: Use write_exact() in lock_suspend_event().
author
Keir Fraser
<keir.fraser@citrix.com>
Wed, 18 Mar 2009 17:25:54 +0000
(17:25 +0000)
committer
Keir Fraser
<keir.fraser@citrix.com>
Wed, 18 Mar 2009 17:25:54 +0000
(17:25 +0000)
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
tools/libxc/xc_domain_save.c
patch
|
blob
|
history
diff --git
a/tools/libxc/xc_domain_save.c
b/tools/libxc/xc_domain_save.c
index d830dfce1f9a344425daa6021ef50cedee2a3b2f..980c481de4c7efc6bb8e9d8a7bb0f315888c9b09 100644
(file)
--- a/
tools/libxc/xc_domain_save.c
+++ b/
tools/libxc/xc_domain_save.c
@@
-747,7
+747,7
@@
static xen_pfn_t *map_and_save_p2m_table(int xc_handle,
#define SUSPEND_LOCK_FILE "/var/lib/xen/suspend_evtchn_lock.d"
static int lock_suspend_event(void)
{
- int fd;
+ int fd
, rc
;
mode_t mask;
char buf[128];
@@
-761,10
+761,10
@@
static int lock_suspend_event(void)
umask(mask);
snprintf(buf, sizeof(buf), "%10ld", (long)getpid());
-
write
(fd, buf, strlen(buf));
+
rc = write_exact
(fd, buf, strlen(buf));
close(fd);
- return
0
;
+ return
rc
;
}
static int unlock_suspend_event(void)